home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr42
/
vocshow2.zip
/
VOC_DATA.LIB
< prev
next >
Wrap
Text File
|
1993-06-08
|
2KB
|
65 lines
-- Copyright 1992 by Tom Moran. May be used by anyone for any purpose.
with SB_Samples;
package Voc_Data is
Max_Block_Length: constant := 10000; -- arbitrary
subtype Block_Lengths is Integer range 0 .. Max_Block_Length;
subtype Block_Indices is Integer range 1 .. Max_Block_Length;
type Block_Types is (Terminator, Voice_Data, Voice_Continuation, Silence,
Marker, Text, Start_Repeat, End_Repeat);
for Block_Types use (Terminator => 0, Voice_Data => 1,
Voice_Continuation => 2, Silence => 3,
Marker => 4, Text => 5,
Start_Repeat => 6, End_Repeat => 7);
for Block_Types'Size use 8;
subtype Sample_Rates is Natural range 3906 .. Integer'Last;
type Pack_Types is (Unpacked, Halved, Thirds, Quartered);
for Pack_Types use (Unpacked => 0, Halved => 1, Thirds => 2, Quartered => 3);
subtype Positive_Durations is Duration range 0.0 .. Duration'last;
type Markers is range 1 .. 16#FFFE#;
type Repeat_Counts is range 1 .. 16#FFFF#;
type Blocks(Block_Type: Block_Types := Terminator;
Packing : Pack_Types := Unpacked) is
record
Block_Length: Block_Lengths := 1;
case Block_Type is
when Terminator =>
null;
when Voice_Data | Voice_Continuation =>
Sample_Rate: Sample_Rates;
case Packing is
when Unpacked =>
Unpacked_Sound: SB_Samples.Unpacked_Sounds(Block_Indices);
when Halved =>
Packed_Sound: SB_Samples.Packed_Sounds(Block_Indices);
when Thirds =>
Packed3_Sound: SB_Samples.Packed3_Sounds(Block_Indices);
when Quartered =>
Packed4_Sound: SB_Samples.Packed4_Sounds(Block_Indices);
end case;
when Silence =>
Silence_Interval: Positive_Durations;
when Marker =>
Mark : Markers;
when Text =>
Text_String: String(Block_Indices);
when Start_Repeat =>
Count : Repeat_Counts;
when End_Repeat =>
null;
end case;
end record;
end Voc_Data;